<?php
/**
 * 特殊独立奖池类型
 */
namespace App\Models\MainDB;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;

class IndependentPoolType extends Model{

    protected $table = 'ln_independent_pool_type';     //数据库内完整表名

    protected $primaryKey = 'id';    //主键名

    protected $fillable = [
        'id',      //主键ID
        'name',         //奖池类型名称
        'sort',         //排序
        'add_time',
    ];

    public $timestamps = false;

    //获取列表
    public function getIndependentPoolTypeList()
    {
        return $this->select('id', 'name', 'sort', 'add_time')->orderBy(DB::raw('sort asc, id'))->get()->toArray();
    }
}